package com.sharing.mapper;

import com.alibaba.druid.sql.dialect.oracle.ast.OracleDataTypeIntervalYear;
import com.sharing.domain.User;
import com.sharing.domain.UserProduction;
import org.apache.ibatis.annotations.Mapper;

import javax.jws.soap.SOAPBinding;
import java.util.List;

/**
 * @author MingTian
 * @version 1.0
 * @description TODO
 * @date 2023/4/1 22:56
 */
@Mapper
public interface UserMapper {
    User selectUserById(Integer id);

    User selectUserByUserName(String userName);

    List<User> selectUsersByPage(Integer page, Integer size);

    List<User> selectUsersByIdentity(String identity, Integer page, Integer size);

    List<User> selectUsersByCity(String city, Integer page, Integer size);

    List<User> selectUsersByMultCondition(List<String> citys, String identity, Integer minAge, Integer maxAge, Integer page, Integer size);

    Integer insertUser(User user);

    Integer deleteUserById(Integer id);

    Integer deleteUserByUserName(String userName);

    Integer updateUser(User user);

    List<User> selectUsersByIds(List<Integer> userIds, Integer page, Integer size);

    List<User> selectUsersByUserIds(List<Integer> ids);

    Integer selectUsersNumByPage();

    Integer selectUsersNumByIdentity(String identity);

    Integer selectUsersNumByCity(String city);

    Integer selectUsersNumByMultCondition(List<String> citys, String identity, Integer minAge, Integer maxAge);

    Integer selectUsersNumByIds(List<Integer> ids);

    UserProduction selectUserProductionById(Integer id);

    List<User> selectUserByPosition(User user, Integer page, Integer size);
}